import Vue from 'vue'
import Router from 'vue-router'
import main from '@/views/main'
import live from '@/views/barItem/live/live'
import user from '@/views/barItem/user/user'
import find from '@/views/barItem/find/find'
import findDetail from '@/views/barItem/find/findDetail'
import detailSign from '@/views/barItem/find/detailSign'
import trainDetail from '@/views/barItem/find/trainDetail'
import trainBuy from '@/views/barItem/find/trainBuy'
import video from '@/views/barItem/find/video'
import videoDetail from '@/views/barItem/find/videoDetail'
import train from '@/views/barItem/find/train'
import community from '@/views/barItem/community/community'
import communityDetail from '@/views/barItem/community/communityDetail'
import communityWrite from '@/views/barItem/community/communityWrite'
import detailWrite from '@/views/barItem/community/detailWrite'
import detailLive from '@/views/barItem/live/detailLive'
import searchResult from '@/views/barItem/other/searchResult'

Vue.use(Router)

export default new Router({

  routes: [
    {
      path: '/',
      name: 'main',
      component: main,
      children: [
        {
          path: '/',
          name: '直播',
          component: live
        },
        {
          path: '/find',
          name: '发现',
          component: find
        },
        {
          path: '/community',
          name: '社区',
          component: community
        },
        {
          path: '/user',
          name: '我的',
          component: user
        },
      ]
    },
    {
      path: '/detailLive',
      name: 'detailLive',
      component: detailLive,
    },
    {
      path: '/searchResult',
      name: 'searchResult',
      component: searchResult,
    },
    {
      path: '/findDetail',
      name: 'findDetail',
      component: findDetail,
    },
    {
      path: '/detailSign',
      name: 'detailSign ',
      component: detailSign,
    },
    {
      path: '/train',
      name: 'train',
      component: train,
    },
    {
      path: '/trainDetail',
      name: 'trainDetail',
      component: trainDetail,
    },
    {
      path: '/trainBuy',
      name: 'trainBuy',
      component: trainBuy,
    },
    {
      path: '/video',
      name: 'video',
      component: video,
    },
    {
      path: '/videoDetail',
      name: 'videoDetail',
      component: videoDetail,
    },
    {
      path: '/communityDetail',
      name: 'communityDetail',
      component:communityDetail,
    },
    {
      path: '/communityWrite',
      name: 'communityWrite',
      component: communityWrite,
    },
    {
      path: '/detailWrite',
      name: 'detailWrite',
      component: detailWrite,
    }
  ]
})
